<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html,
        body,
        #map {
            width: 100%;
            height: 100%;
            padding: 0;
            margin: 0
        }
        /* 隐藏图标 */
        
        .anchorBL,
        .BMap_cpyCtrl {
            display: none;
        }
    </style>
</head>

<body>
    <div id="map"></div>
    <script>
        function init() {
            var map = new BMapGL.Map('map');
            var point = new BMapGL.Point(116.404, 39.915);
            map.centerAndZoom(point, 10);
            map.enableScrollWheelZoom(true); // 滑轮可滚动
            /* 在开发者控制台-创建自定义地图回去样式ID */
            map.setMapStyleV2({
                styleId: '样式id值'
            })
        }
        window.onload = function() {
            var script = document.createElement('script');
            script.src = 'https://api.map.baidu.com/api?type=webgl&v=1.0&ak=您的密匙C&callback=init'
            document.body.appendChild(script)
        }
    </script>
</body>

</html>